home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / sauter.zip / LFONTS.TEX < prev    next >
Text File  |  1990-10-31  |  39KB  |  882 lines

  1. % File LFONTS - Version of 11 November 1986.
  2. %
  3. % This version of LFONTS.TEX is for the CMR fonts.  It was converted
  4. % from the AMR version by David Fuchs on 18 December 1985.
  5. % And corrected on 11 Nov 1986 by Leslie Lamport.  
  6.  
  7. % This file contains the following kludge: 8pt and 9pt versions
  8. % of \sc call magnifications of amcsc10 instead of cmcsc10.
  9. % Search for KLUDGE to find for both instances.
  10. %
  11. % NOTE: The above-mentioned KLUDGE has been removed for DosTeX
  12. %
  13. % This file needs to be customized for the fonts available at a particular
  14. % site.  There are three places where changes need to be made.  They
  15. % can be found by searching this file for the string  FONT-CUSTOMIZING.
  16. %
  17. % FONT CONVENTIONS
  18. %
  19. % A TYPESTYLE COMMAND is something like \it that defines a type style.
  20. % Each style command \xx is defined to be \protect\pxx, where 
  21. % \pxx is defined to choose the correct font for the current size.
  22. % This allows style commands to appear in 'unsafe' arguments where
  23. % protection is required.
  24. %
  25. % A SIZE COMMAND is something like \normalsize that defines a type size.
  26. % It is defined by the document style.  However, \normalsize is handled
  27. % somewhat differently because it is called so often--e.g., on every
  28. % page by the output routine.  The document style defines \@normalsize
  29. % instead of \normalsize.
  30. % A ONE-SIZE typestyle is one that exists only in the \normalsize size.
  31. %
  32. % A FONT-SIZE COMMAND is one that defines \textfont, \scriptfont and 
  33. % \scriptscriptfont for the font families corresponding to preloaded fonts,
  34. % as well as the typestyle commands for the preloaded fonts.  Each
  35. % font-size command has an associated @fontsize command, having the same
  36. % name except for an '@' at the front.   All font-size commands are defined 
  37. % in LFONTS.  The naming convention is that a fifteenpt font has a font-size
  38. % name \xvpt, and so on.
  39. %
  40. % Each size command \SIZE executes the command
  41. %             \@setsize\SIZE{BASELINESKIP}\FONTSIZE\@FONTSIZE
  42. % which does the following.
  43. %   0. Executes \@nomath\SIZE to issue warning if in math mode.
  44. %   1. \let \@currsize = \SIZE  
  45. %   2. Sets \strutbox to a strut of height .7 * BASELINESKIP and
  46. %      depth .3 * BASELINESKIP
  47. %   3. Sets \baselineskip to \baselinestretch * BASELINESKIP 
  48. %      and 
  49. %   4. Calls \FONTSIZE 
  50. %   5. Executes the \@FONTSIZE command.
  51. % It should then define all the typestyle commands not defined by the font-size
  52. % command, except for the one-size type styles. A typestyle command for which
  53. % the corresponding font exists but is not preloaded is defined to expand to a
  54. % \@getfont command.  A typestyle whose font does not exist is defined to 
  55. % expand to a \@subfont command.
  56. %
  57. % A one-size typestyle whose font is not preloaded is defined to expand to
  58. % a \@onesizefont command.
  59. %
  60. % \em is defined to be \it inside an unslanted style and \rm inside a
  61. % slanted style.  An \em command in a section title will produce a \pem
  62. % command in the table of contents.
  63. %
  64.  
  65. \def\em{\protect\pem{}}
  66. \def\pem{\ifdim \fontdimen\@ne\font >\z@ \rm \else \it \fi}
  67.  
  68. \def\normalsize{\ifx\@currsize\normalsize \rm \else \@normalsize\fi}
  69.  
  70. % \load{SIZE}{STYLE} : Solves anomaly of loaded-on-demand font
  71. %    used for first time in math mode.  Give this command outside math
  72. %    mode, before formula using it for first time.
  73. \def\load#1#2{\let\@tempa\@currsize \let\@currsize\relax #1#2\@tempa}
  74.  
  75. % \newfont{\CMD}{FONT} defines \CMD to be the font FONT.
  76. %    It is equivalent to \font \CMD = FONT
  77. % \symbol{NUM} == \char NUM
  78.  
  79. \def\newfont#1#2{\@ifdefinable #1{\font #1=#2\relax}}
  80. \def\symbol#1{\char #1\relax}
  81.  
  82.  
  83.  
  84. % \@getfont \STYLE \FAM \@FONTSIZE{LOADING.INFO}
  85. %   \STYLE       = style command
  86. %   \FAM         = a control sequence defined by \newfam\FAM
  87. %   \@FONTSIZE   = the @fontsize command for the current size. 
  88. %   LOADING.INFO = information needed to load the font--e.g., 
  89. %                  cmtti10 \magstep 2
  90. %   Does the following, where \FONTNAME denotes a new unique, untypeable
  91. %   font name:
  92. %    1. Executes  \font \FONTNAME = LOADING.INFO 
  93. %    2. Appends '\textfont FAM \FONTNAME \def\STYLE{\fam \FAM \FONTNAME}' 
  94. %       to the definition of \@FONTSIZE.
  95. %    3. Executes \@FONTSIZE \STYLE.
  96. %
  97. % \@nohyphens\STYLE\@FONTSIZE
  98. %   Used right after \@getfont to set \hyphenchar of the new font to -1,
  99. %   thereby prohibiting hyphenation.  It is used with \tt fonts.
  100. %   (\@nohyphens was added on 12/18/85)
  101. %
  102. % \@subfont \STYLE \REPSTYLE 
  103. %   \STYLE, \REPSTYLE = type style commands.
  104. %   Types warning message and defines uses \REPSTYLE.
  105. %
  106. % \@onesizefont \STYLE {LOADING.INFO}
  107. %   Defines \STYLE to be a typestyle that exists only for the \normalsize
  108. %   size.  It produces the font specified by LOADING.INFO
  109. %
  110. % \@addfontinfo\@FONTSIZE{DEFS}
  111. %    Expands DEFS and adds to the definition of \@FONTSIZE. Items that should 
  112. %    not be expanded should be protected with \@prtct---except no protection
  113. %    is needed for '\def\foo', only for the contents of the definition.
  114. %
  115. % \@nomath\CS : Types a warning '\CS used in math mode' if encountered
  116. %    in math mode.
  117.  
  118. % Remove \outer from definition of \newfam
  119. \def\newfam{\alloc@8\fam\chardef\sixt@@n}
  120.  
  121. \def\@setsize#1#2#3#4{\@nomath#1\let\@currsize#1\baselineskip
  122.    #2\setbox\strutbox\hbox{\vrule height.7\baselineskip
  123.       depth.3\baselineskip width\z@}\baselineskip\baselinestretch\baselineskip
  124.    \normalbaselineskip\baselineskip#3#4}
  125.  
  126. \newif\if@bold
  127.  
  128. \let\@prtct=\relax
  129.  
  130. \def\@addfontinfo#1#2{{\def\@prtct{\noexpand\@prtct\noexpand}\def\def{\noexpand
  131.     \def\noexpand}\xdef#1{#1#2}}}
  132.  
  133. \def\@getfont#1#2#3#4{\@ifundefined{\string #1\string #3}{\global\expandafter
  134.     \font \csname \string #1\string #3\endcsname #4\relax 
  135.      \@addfontinfo#3{\textfont #2\csname \string #1\string #3\endcsname 
  136.      \scriptfont #2\csname \string #1\string #3\endcsname 
  137.      \scriptscriptfont #2\csname \string #1\string #3\endcsname 
  138.      \def#1{\fam #2\csname\string #1\string #3\endcsname}}}{}#3#1}
  139.  
  140. \def\@nohyphens#1#2{\global\expandafter \hyphenchar\csname 
  141.    \string #1\string #2\endcsname \m@ne}
  142.  
  143. \def\@subfont#1#2{\@warning{No \string#1\space typeface in 
  144.         this size, using \string#2}#2}
  145.  
  146. \def\@onesizefont#1#2{\expandafter\newfam\csname fm\string#1\endcsname
  147.   \global\expandafter\font\csname ft\string#1\endcsname #2\relax
  148.   \gdef#1{\ifx \@currsize\normalsize \@ftfam#1\else
  149.   \@warning{Typeface \string#1\space available only in 
  150.   \string\normalsize, using \string\rm}\gdef #1{\ifx \@currsize\normalsize 
  151.   \textfont\@fontfam#1 \scriptfont\@fontfam#1 \scriptscriptfont
  152.   \@fontfam#1\@ftfam#1\else \rm\fi}#1\fi}#1}
  153.  
  154. \def\@ftfam#1{\fam\csname fm\string#1\endcsname\csname ft\string#1\endcsname}
  155.  
  156. \def\@nomath#1{\ifmmode \@warning{\string#1\space in math mode.}\fi}
  157. \def\@nomathbold{\ifmmode \@warning{\string\mathbold\space in math mode.}\fi}
  158.  
  159. % The following definitions save token space.  E.g., using \@height 
  160. % instead of height saves 5 tokens at the cost in time of one macro 
  161. % expansion.
  162.  
  163. \def\@height{height}
  164. \def\@depth{depth}
  165. \def\@width{width}
  166.  
  167. \def\@magscale#1{ scaled \magstep #1}
  168. \def\@halfmag{ scaled \magstephalf}
  169. \def\@ptscale#1{ scaled #100}
  170.  
  171.  
  172. %% FONT-CUSTOMIZING:  The following \font commands define the
  173. %% preloaded LaTeX fonts.  Font names should be changed to cause
  174. %% different fonts to be loaded in place of these particular AMR fonts.
  175. %% \font commands should be added or deleted to change which fonts
  176. %% are preloaded.
  177.  
  178. % five point
  179.  \font\fivrm  = cmr5               % roman
  180.  \font\fivmi  = cmmi5              % math italic
  181.     \skewchar\fivmi ='177          %  for placement of accents
  182. %\font\fivmib = cmmib10  \@ptscale5 % bold math italic
  183.  \font\fivsy  = cmsy5              % math symbols
  184.     \skewchar\fivsy ='60           %   for placement of math accents
  185. %\font\fivsyb = cmbsy10 \@ptscale5 % bold math symbols
  186. %\font\fivit  = cmti7   scaled 714 % text italic
  187. %\font\fivsl  = cmsl10  \@ptscale5 % slanted
  188. %\font\fivbf  = cmbx7   scaled 714 % extended bold 
  189. %\font\fivbfs = cmbxsl10\@ptscale5 % extended bold slanted
  190. %\font\fiv